<?php

include 'LoggerStub.php';

include 'eu/freeplace/core/Utils.php';

use eu\freeplace\core\Utils as Utils;

/**
 * @author Elmar Dott
 */
class UtilsTest extends PHPUnit_Framework_TestCase {

    
    public function testEscapeHTML() {
                
        $utils = Utils::getInstance();
        //POSITIVE EXAMPLES
        $this->assertEquals('&lt;a href=&quot;http://www.sample.org&quot;&gt;sample.org&lt;/a&gt;', $utils->escapeHTML('<a href="http://www.sample.org">sample.org</a>'));
    }
    
    public function testUnescapeHTML() {
                
        $utils = Utils::getInstance();
        //POSITIVE EXAMPLES
        $this->assertEquals('<a href="http://www.sample.org">sample.org</a>', $utils->unescapeHTML('&lt;a href=&quot;http://www.sample.org&quot;&gt;sample.org&lt;/a&gt;'));
    }  
    
}//CLASS

?>